﻿//-----------------------------------------------------------------------------------------
// <copyright file="DirectShow.cs" company="Jakub Florczyk (www.jakubflorczyk.pl)">
//      Copyright © 2009 Jakub Florczyk (www.jakubflorczyk.pl)
//      http://samsungmobilesdknet.codeplex.com
// </copyright>
//-----------------------------------------------------------------------------------------

namespace DirectShow
{
    using System.Runtime.InteropServices;
    using System;

    [ComImport, 
    Guid("56a86895-0ad4-11ce-b03a-0020af0ba770"),
    InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IBaseFilter
    {
        [PreserveSig]
        int GetClassID(
            [Out] out Guid pClassID);

        [PreserveSig]
        int Stop();

        [PreserveSig]
        int Pause();

        [PreserveSig]
        int Run(long tStart);

        [PreserveSig]
        int GetState([In] int dwMilliSecsTimeout, [Out] out object filtState);

        [PreserveSig]
        int SetSyncSource([In] object pClock);

        [PreserveSig]
        int GetSyncSource([Out] out object pClock);

        [PreserveSig]
        int EnumPins([Out] out object ppEnum);

        [PreserveSig]
        int FindPin(
            [In, MarshalAs(UnmanagedType.LPWStr)] string Id,
            [Out] out object ppPin
        );

        [PreserveSig]
        int QueryFilterInfo([Out] out object pInfo);

        [PreserveSig]
        int JoinFilterGraph(
            [In] object pGraph,
            [In, MarshalAs(UnmanagedType.LPWStr)] string pName
            );

        [PreserveSig]
        int QueryVendorInfo([Out, MarshalAs(UnmanagedType.LPWStr)] out string pVendorInfo);
    }
}
